import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/user/login',
    method: 'post',
    // 形参
    data
  })
}

export function getInfo() {
  return request({
    url: 'user/info',
    method: 'post'
    // params: { token }
  })
}

export function logout() {
  return request({
    url: 'user/logout',
    method: 'get'
  })
}


export function selectAllUser(params) {
  return request({
    url: 'user/selectAllUser',
    method: 'get',
    params
  })
}

export function insertUser(params) {
  return request({
    url: 'user/insert',
    method: 'get',
    params
  })
}

export function updateUser(params) {
  return request({
    url: 'user/update',
    method: 'get',
    params
  })
}

export function deleteUser(params) {
  return request({
    url: 'user/delete',
    method: 'get',
    params
  })
}
